<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>评教管理系统</title>
</head>
<link th:href="@{/plugin/layui/css/layui.css}" rel="stylesheet"/>
<link th:href="@{/css/step.css}" rel="stylesheet"/>
<script type="text/javascript" th:src="@{/plugin/layui/layui.js}"></script>
<script type="text/javascript" th:src="@{/plugin/mylayui/step.js}"></script>
<script type="text/javascript" th:src="@{/js/common.js}"></script>
<script type="text/javascript" th:src="@{http://libs.baidu.com/jquery/1.7.2/jquery.js}"></script>
<body>
<div class="layui-step">
    <div class="layui-step-content layui-clear">
        <div class="layui-step-content-item">
            <div class="layui-form-item layui-form-text">
                <div class="layui-input-block">
                    <textarea placeholder="请输入内容" name="xieyi" class="layui-textarea" readonly style="height: 350px;"
                    >
                     <p>评分前必须阅读,诚信评分，不能乱评恶评。0-59为差,60-70及格，70-80良好，90-100为优秀</p>
                    </textarea>
                </div>
            </div>
            <div align="center">
                <button class="layui-btn layui-btn-warm next">同意并继续</button>
            </div>
        </div>
        <!--第二步-->
        <div class="layui-step-content-item">
            <div id="course-content"></div>
            <!--数据填写 -->
            <iframe src="" id="teacher-iframe" style="width:100%;height:100%;border:none;outline:none;"></iframe>
        </div>
    </div>
</div>
</body>
<script th:src="@{/plugin/layui/layui.js}"></script>
<!--<script th:src="@{/plugin/layui/lay.modules/jquery.js}"></script>-->
<!--<script th:src="@{/plugin/mylayui/step.js}"></script>-->
<!--<script th:src="@{/plugin/layui/lay.modules/table.js}"></script>-->
<script>

   // layui.config({
     //   base: "../static/plugin/mylayui/"
   // }).use(['jquery', 'step', 'table'], function () {
    //var $;
    //var table;
    layui.config({
        base: "/plugin/mylayui/"
    }).use(['jquery', 'step', 'table'], function () {
        var $ = layui.jquery;
        var table = layui.table;
        var step = layui.step;
        step.render({
            elem: '.layui-step',
            isOpenStepLevel: true
        });
        $(".prev").on("click", function () {
            step.prev();
        });
        $(".next").on("click", function () {
            step.next();
        });

        var $textarea = $('textarea[name=xieyi]');
        var html = $textarea.val();
        $textarea.val($(html).text());

        $.post("course/select?page=1&limit=100", function (msg) {
            var obj = msg.data;
            var html = "<fieldset class=\"layui-elem-field site-demo-button\" style=\"margin-top: 30px;\"><legend>课程选择</legend><div style='margin-top:10px;margin-left:10px;'>";
            for (var i in obj) {
                html = html + "<a class=\"layui-btn course-class\" href='step_teacher?id="+obj[i].id+"'>" + obj[i].courseName + "</a>"
            }
            html = html + "</div></fieldset>";
            $("#course-content").html(html);
        });
    });
</script>

</html>